home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / mus / play / SPLibDev.lha / superplay-lib_DEV / Programmers / Oberon-2 / SuperPlay-Interfaces < prev   
Encoding:
Text File  |  1997-08-15  |  8.9 KB  |  334 lines

  1. ; $VER: SuperPlay-Interfaces 1.2 (03.02.97)
  2. ; Base on the installer script from Thomas Wagner for Interfaces3_6.lha
  3.  
  4. ; Author    Date       Remark
  5. ; -------------------------------------------------------
  6. ; Indy      07-Jul-96  Version 1.0
  7. ; Indy      06-Aug-96  Version 1.1
  8. ; Indy      03-Feb-97  - add #where-is-oberon
  9. ;                      - asks now all questions before start working
  10. ;                      - compile example tools
  11.  
  12. ; Feel free to use it for own installer-scripts.
  13.  
  14.  
  15. (SET #selectLang (ASKCHOICE
  16.                    (PROMPT "")
  17.                    (HELP @askchoice-help)
  18.                    (CHOICES "English Installation"
  19.                             "Deutsche Installation" )
  20.                    (DEFAULT 0)
  21.                  )
  22. )
  23.  
  24. (IF (= #selectLang 0) (SET @language "english")  )
  25. (IF (= #selectLang 1) (SET @language "deutsch")  )
  26.  
  27. (IF (= @language "deutsch")
  28.   (
  29.  
  30.   (SET #msg "Mit diesen Installer-Script werden die Interface-Dateien ins \
  31. gewünschte Verzeichnis kopiert und dann anschließend zur Erzeugung \
  32. der .sym- und .obj-Dateien compiliert. Dabei kann gewählt werden welche \
  33. Objektdateien (.obj, .objs etc.) erzeugt werden sollen und in welchen \
  34. Verzeichnis sich das sym- und obj-Verzeichnis befindet. Außerdem können die \
  35. Quellcodes der Example_Tools kopiert und compiliert werden.")
  36.  
  37.   (SET #whereIsOberon "In welchem Verzeichnis befindet sich der Oberon Compiler?")
  38.   (SET #whereInt-Dir  "In welches Verzeichnis sollen die SuperPlay-Interfaces kopiert werden?" )
  39.   (SET #whereSym-Dir (CAT "In welchem gemeinsamen (Ober-)Verzeichnis befindet sich sowohl "
  40.                          "das Verzeichnis \"sym\" also auch \"obj\", bzw. wo sollen diese "
  41.                          "angelegt werden? " ))
  42.   (SET #whereExamples "In welches Verzeichnis sollen die Example_Tools Beispielsourcen kopiert werden?")
  43.   (SET #whichObjFiles "Welche Objekt-Files sollen angelegt werden? (GC = garbage collector) ")
  44.   (SET #doCopy        "Kopiere")
  45.   (SET #doCopyInfo    "Kopiere .info Dateien")
  46.   (SET #bigDataGC     "Großes Datenmodell mit GC")
  47.   (SET #bigData       "Großes Datenmodell ohne GC")
  48.   (SET #smallDataGC   "Kleines Datenmodell mit GC")
  49.   (SET #smallData     "Kleines Datenmodell ohne GC")
  50.   (SET #compileExamples "Sollen die Example_Tools compiliert werden? Wenn ja mit welcher Option? (GC = garbage collector)")
  51.   (SET #noCompile     "Nicht compilieren")
  52.  
  53.   )
  54. )
  55.  
  56. (IF (= @language "english")
  57.   (
  58.  
  59.   (SET #msg "With this installer-script you can copy and compile the interface-files and \
  60. the Example_Tools sourcecodes. ")
  61.   (SET #whereIsOberon "In which directory is your oberon compiler?")
  62.  
  63.   (SET #whereInt-Dir  "Into which directory I should copy the SuperPlay-interfaces?" )
  64.   (SET #whereSym-Dir (CAT "In which common (main-)directory are your \"sym\" AND \"obj\" "
  65.                           "drawer, or in which directory should they be created? "))
  66.   (SET #whereExamples "Into which directory I should copy the Example_Tools sourcecodes?")
  67.   (SET #whichObjFiles "Which sort of object-files should be created (gc = garbage collector)? ")
  68.   (SET #doCopy        "Copy")
  69.   (SET #doCopyInfo    "Copy .info files")
  70.   (SET #bigDataGC     "Big data with gc")
  71.   (SET #bigData       "Big data without gc")
  72.   (SET #smallDataGC   "Small data with gc")
  73.   (SET #smallData     "Small data without gc")
  74.   (SET #compileExamples "Should I compile the Example_Tools? IF yes, please select the options (gc = garbage collector).")
  75.   (SET #noCompile     "Do not compile")
  76.   )
  77. )
  78.  
  79. ; *** Procedures ***
  80.  
  81. (PROCEDURE DoIt(
  82.   (TEXTFILE
  83.   (DEST "T:CompileSP")
  84.   (APPEND "STACK 30000\n"
  85.           #parameter)
  86.   )
  87.  
  88.   (WORKING ("Compile SuperPlay-Interfaces:\n- %s..." #modell))
  89.   (EXECUTE "T:CompileSP")
  90.   (DELETE  "T:CompileSP")
  91. ))
  92.  
  93. ; *** Falls nicht vorhanden sym- und obj-Verzeichnis erstellen ***
  94. (PROCEDURE MakeSymObj(
  95.   (IF (NOT (EXISTS (TACKON #parameter "sym")))
  96.           (MAKEDIR (TACKON #parameter "sym") )
  97.   )
  98.   
  99.   (IF (NOT (EXISTS (TACKON #parameter "obj")))
  100.           (MAKEDIR (TACKON #parameter "obj") )
  101.   )
  102. ))
  103.  
  104. (MESSAGE #msg)
  105.  
  106.  
  107. ; *** Where is oberon compiler? ***
  108. (SET @default-dest "Oberon:")
  109. (SET #oberon-dir (ASKDIR (PROMPT #whereIsOberon)
  110.                   (HELP @askfile-help)
  111.                   (DEFAULT @default-dest)
  112.              )
  113. )
  114.  
  115.  
  116. ; *** Zielverzeichnis für Interfaces ermitteln ***
  117.  
  118. (SET @default-dest (TACKON #oberon-dir "Interfaces/"))
  119. (SET #int-dir (ASKDIR (PROMPT #whereInt-Dir)
  120.                   (HELP @askfile-help)
  121.                   (DEFAULT @default-dest)
  122.              )
  123. )
  124.  
  125.  
  126. ; *** Verzeichnis für sym-, obj-Verzeichnis ermitteln ***
  127.  
  128. (SET @default-dest #oberon-dir)
  129. (SET #sym-dir (ASKDIR (PROMPT #whereSym-Dir)
  130.                      (HELP @askfile-help)
  131.                      (DEFAULT @default-dest)
  132.              )
  133. )
  134.  
  135.  
  136. ; *** Which object files ***
  137.  
  138. (SET obj
  139.   (ASKOPTIONS
  140.     (PROMPT #whichObjFiles)
  141.     (HELP @askchoice-help)
  142.     (CHOICES (CAT "obj   - " #bigDataGC)
  143.              (CAT "obja  - " #bigData)
  144.              (CAT "objs  - " #smallDataGC)
  145.              (CAT "objsa - " #smallData)
  146.     )
  147.     (DEFAULT 15)
  148.   )
  149. )
  150.  
  151.  
  152. ; *** Where Examples? ***
  153.  
  154. (SET @default-dest "Example_Tools/")
  155. (SET #example-dir (ASKDIR (PROMPT #whereExamples)
  156.                      (HELP @askfile-help)
  157.                      (DEFAULT @default-dest)
  158.              )
  159. )
  160.  
  161.  
  162. ; *** Compile example tools? ***
  163.  
  164. (SET #exaObj
  165.   (ASKCHOICE
  166.     (PROMPT #compileExamples)
  167.     (HELP @askchoice-help)
  168.     (CHOICES (CAT "obj   - " #bigDataGC)
  169.              (CAT "obja  - " #bigData)
  170.              (CAT "objs  - " #smallDataGC)
  171.              (CAT "objsa - " #smallData)
  172.              (CAT #noCompile )
  173.     )
  174.     (DEFAULT 3)
  175.   )
  176. )
  177.  
  178. ; Results:
  179. ; --------
  180. ; #oberon-dir : directory of oberon compiler
  181. ; #int-dir    : destination directory for interfaces
  182. ; #sym-dir    : destination directory for .sym- and .obj files
  183. ; #example-dir: destination directory for Example_Tools sourcecodes
  184. ; #obj        : compile interfaces options
  185. ; #exaObj     : compile Example_Tools options
  186.  
  187.  
  188. ;*** Interfaces kopieren ***
  189.  
  190. (SET #parameter #sym-dir)  ; If not exists make sym/obj dir
  191. (MakeSymObj)
  192.  
  193. (FOREACH "Interfaces/" "#?"
  194.   (COPYLIB
  195.    (PROMPT (CAT (#doCopy) (" '%s'..." @each-name)))
  196.    (HELP @copylib-help)
  197.    (SOURCE (TACKON "Interfaces/" @each-name))
  198.    (DEST #int-dir)
  199.    (CONFIRM)
  200.   )
  201. )
  202. (COMPLETE 10)
  203.  
  204. ;*** Copy Example_Tools ***
  205.  
  206. (WORKING #example-dir)
  207. (SET #parameter #example-dir)  ; If not exists make sym/obj dir
  208. (MakeSymObj)
  209.  
  210. (IF (<> #example-dir "Example_Tools/")
  211.   (
  212.     (FOREACH "Example_Tools/" "#?.mod"
  213.       (COPYLIB
  214.        (PROMPT (CAT (#doCopy) (" '%s'..." @each-name)))
  215.        (HELP @copylib-help)
  216.        (SOURCE (TACKON "Example_Tools/" @each-name))
  217.        (DEST #example-dir)
  218.        (CONFIRM)
  219.       )
  220.     )
  221.  
  222.     (COPYLIB
  223.      (PROMPT (CAT #doCopy " 'CompileExample_Tools'"))
  224.      (HELP @copylib-help)
  225.      (SOURCE "Example_Tools/CompileExample_Tools")
  226.      (DEST #example-dir)
  227.      (CONFIRM)
  228.     )
  229.  
  230.     (FOREACH "Example_Tools/" "#?.info"
  231.       (COPYFILES
  232.        (PROMPT (CAT (#doCopyInfo) (" '%s'..." @each-name)))
  233.        (HELP @copyfiles-help)
  234.        (SOURCE (TACKON "Example_Tools/" @each-name))
  235.        (DEST #example-dir)
  236.       )
  237.     )
  238.   )
  239. )
  240. (COMPLETE 20)
  241.  
  242.  
  243. ; Oberon Batch-Datei erstellen
  244.  
  245. (TEXTFILE (DEST "T:BatchSP")
  246.           (APPEND (TACKON #int-dir ("spObjects.mod"))
  247.                   ("\n")
  248.                   (TACKON #int-dir ("SuperPlay.mod"))
  249.                   ("\n")
  250.           )
  251. )
  252.  
  253. (SET @execute-dir #sym-dir)
  254. (SET @default-dest #int-dir)
  255.  
  256. (SET #m   (TACKON #oberon-dir "Oberon <T:BatchSP >CON:////SuperPlay-Library -m  "))
  257. (SET #ma  (TACKON #oberon-dir "Oberon <T:BatchSP >CON:////SuperPlay-Library -ma "))
  258. (SET #md  (TACKON #oberon-dir "Oberon <T:BatchSP >CON:////SuperPlay-Library -md "))
  259. (SET #mda (TACKON #oberon-dir "Oberon <T:BatchSP >CON:////SuperPlay-Library -mda"))
  260.  
  261. (RUN "Resident " (TACKON #oberon-dir "Oberon"))
  262. (RUN "Resident " (TACKON #oberon-dir "OLink"))
  263. (RUN (TACKON #oberon-dir "ResidentManager"))
  264.  
  265. (IF (IN obj 0)   ; Großes Datenmodell mit Garbage Collector
  266.   (
  267.   (SET #modell #bigDataGC)
  268.   (SET #parameter #m)
  269.   (DoIt)
  270.   )
  271. )
  272.  
  273. (IF (IN obj 1)   ; Großes Datenmodell ohne Garbage Collector
  274.   (
  275.   (SET #modell #bigData)
  276.   (SET #parameter #ma)
  277.   (DoIt)
  278.   )
  279. )
  280.  
  281. (IF (IN obj 2)   ; Kleines Datenmodell mit Garbage Collector
  282.   (
  283.   (SET #modell #smallDataGC)
  284.   (SET #parameter #md)
  285.   (DoIt)
  286.   )
  287. )
  288.  
  289. (IF (IN obj 3)   ; Kleines Datenmodell ohne Garbage Collector
  290.   (
  291.   (SET #modell #smallData)
  292.   (SET #parameter #mda)
  293.   (DoIt)
  294.   )
  295. )
  296. (COMPLETE 50)
  297.  
  298.  
  299. ; *** Compile Example_Tools ***
  300.  
  301. (SET @execute-dir #example-dir)
  302. (WORKING "Compile Example_Tools")
  303.  
  304. (IF (= #exaObj 0)   ; Großes Datenmodell mit Garbage Collector
  305.   (
  306.     (EXECUTE "CompileExample_Tools -m")
  307.   )
  308. )
  309.  
  310. (IF (= #exaObj 1)   ; Großes Datenmodell ohne Garbage Collector
  311.   (
  312.     (EXECUTE "CompileExample_Tools -ma")
  313.   )
  314. )
  315.  
  316. (IF (= #exaObj 2)   ; Kleines Datenmodell mit Garbage Collector
  317.   (
  318.     (EXECUTE "CompileExample_Tools -md")
  319.   )
  320. )
  321.  
  322. (IF (= #exaObj 3)   ; Kleines Datenmodell ohne Garbage Collector
  323.   (
  324.     (EXECUTE "CompileExample_Tools -mda")
  325.   )
  326. )
  327.  
  328. (COMPLETE 100)
  329.  
  330. (DELETE "T:CompileSP")
  331. (DELETE "T:BatchSP")
  332.  
  333. (EXIT "tschuess\n         [|8:)")
  334.